package com.filmbooks.model.detail;

import com.filmbooks.api.ZhihuApi;
import com.filmbooks.contract.detail.ZhihuDetailContract;
import com.filmbooks.model.home.bean.home.ZhihuDailyDetailBean;
import com.zyw.horrarndoo.sdk.helper.RetrofitCreateHelper;
import com.zyw.horrarndoo.sdk.helper.RxHelper;

import io.reactivex.Observable;

/**
 * Created by heshuxiang on 2018/3/8.
 * 描述：
 * 公司：盟将威
 * 作者：heshuxiang
 * 日期：2018/3/8.
 * 工程：FilmBooks
 * 包：com.filmbooks.model.detail
 */

public class ZhihuDetailModel implements ZhihuDetailContract.IZhihuDetailModel {
    public static ZhihuDetailModel newInstance() {
        return new ZhihuDetailModel();
    }

    @Override
    public Observable<ZhihuDailyDetailBean> getDailyDetail(String id) {
        return RetrofitCreateHelper.createApi(ZhihuApi.class, ZhihuApi.HOST).getZhihuDailyDetail(id).compose(RxHelper.<ZhihuDailyDetailBean>rxSchedulerHelper());
    }
}
